package org.marsdonne.commons;

public interface IdGenerator {

    enum Algorithm {
        SnowFlake
    }

    long nextId();

    static IdGenerator newInstance(Algorithm algorithm) {
        switch (algorithm) {
            case SnowFlake:
            default:
                return new SnowFlakeCore();
        }
    }

    static IdGenerator newInstance() {
        return newInstance(Algorithm.SnowFlake);
    }
}
